$(function () {
    var submit = $("#submit"), cancel = $("#cancel");
    submit.on("click", function(e){
        e.stopPropagation();
        var param = $("form").formToJson();
        $.post("save.html",param,function(e){
            if(e==1){
                location.href = "index.html";
            }else{
                alert(e.message);
            }
        });
    });
});